package com.adds.lvds.controller.servlet;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import com.adds.lvds.core.utils.ApplicationContextUtils;
import com.adds.lvds.core.utils.ServerInfo;
import com.adds.lvds.security.acegi.utils.MenuUtil;
import com.adds.lvds.service.impl.code.SysCodeSetting;

public class InitServerServlet extends HttpServlet {
	
	/**
	 * Description:
	 */
	private static final long serialVersionUID = -3372765646794845641L;
	
	public void init(ServletConfig config) throws ServletException {
		// 1.初始化LVDS绝对路径
		String serverPath = config.getServletContext().getRealPath("/");
		ServerInfo.setServerPath(serverPath);
		ApplicationContextUtils.setServletContext(config.getServletContext());
		//代码设置初始化
		SysCodeSetting.load();
	
		MenuUtil.init();
		
	}
}
